/*
 * CClient.h
 *
 *  Created on: 19.07.2009
 *      Author: oli
 */

#ifndef CCLIENT_H_
#define CCLIENT_H_

#include <stdio.h>
#include "../../../raknet/Source/RakNetworkFactory.h"
#include "../../../raknet/Source/RakPeerInterface.h"
#include "../../../raknet/Source/MessageIdentifiers.h"
#include "../../../SDL/include/SDL_thread.h"
#include "../../../SDL/include/SDL_mutex.h"
#include "../../../raknet/Source/NetworkIDObject.h"
#include "../GUI/IGUICallback.h"

#define MAX_CLIENTS 16
#define SERVER_PORT 60000

class CClient
{
private:
	RakPeerInterface* m_pClient;
	SDL_Thread* m_pPollThread;
	IGUICallback* m_pConfigDialog;
	bool m_bClientstarted;

public:
	CClient();
	~CClient();
	bool AttemptConnection(const char* Server, unsigned short RemotePort);
	int RunPolling(void *data);
	void SetCallbackGUI(IGUICallback* CallbackGUI);
	void SendChatMessage(const char* str);
	void __cdecl ChatMessageFromServer(RPCParameters *rpcParms);
};

#endif /* CCLIENT_H_ */
